home *** CD-ROM | disk | FTP | other *** search
/ PC-Blue - MS DOS Public Domain Library / PC-Blue MS-DOS Public Domain Library - NYACC.iso / vol059 / printdoc < prev    next >
Encoding:
Text File  |  1987-01-13  |  23.1 KB  |  631 lines

  1.                                                                  1
  2.     
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.                                  EPISTAT
  21.                            Statistical Package
  22.                       for the IBM Personal Computer
  23.  
  24.                            Version 3.0, 1984
  25.  
  26.  
  27.  
  28.  
  29.  
  30.                       Written by:
  31.    
  32.                          Tracy L. Gustafson, M.D.
  33.  
  34.                               Copyright 1984
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                                                                  2
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                               INTRODUCTION
  74.  
  75.    
  76.         EPISTAT is a collection of programs written in BASICA for 
  77.    statistical analysis of small to medium-sized data samples ( < 28
  78.    samples or variables and < 2000 total data entries per file).
  79.    The 25 programs in EPISTAT perform more than 40 common statistical
  80.    tests or functions and provide utilities for data entry, editing,
  81.    printing, graphing, sorting, selecting, transforming and crosstabs.
  82.  
  83.         The programs are intended to be as self-explanatory and user-
  84.    friendly as possible.  You do not need to memorize this guide
  85.    before using the programs.  On the other hand, neither the programs
  86.    nor this manual purport to TEACH the proper use or interpretation
  87.    of statistics.  The user must have some familiarity with the kinds
  88.    of data required and the underlying assumptions appropriate to each
  89.    statistical test.
  90.  
  91.  
  92.    For further explanations of tests, refer to:
  93.  
  94.    1.  Colton, Theodore. Statistics in Medicine. Little, Brown and Co.
  95.          Boston, 1974.
  96.    2.  Fleiss, Joseph.  Statistical Methods for Rates and Proportions.
  97.          John Wiley and Sons. New York, 1981.
  98.    3.  Snedecor, George W. and Cochran, William G. Statistical Methods.
  99.          Iowa State Univ. Press. Ames, Iowa, 1978.
  100.    4.  Schlesselman, James. Case-Control Studies. Oxford Univ. Press.
  101.          New York, 1982.
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.    CAVEAT:
  113.         These programs have been tested extensively, but I cannot 
  114.    guarantee that they will work correctly with every possible data set.
  115.    Incorrect results are usually due to errors in format or type of
  116.    data entered.  If you believe you have discovered an error in the
  117.    programs, please write me.  I intend to correct any bugs that are
  118.    brought to my attention.
  119.         It is good practice to regularly compare the results obtained
  120.    by programs in EPISTAT with results obtained by your previous method
  121.    of calculation.  ANY unexpected result should be questionned and
  122.    double-checked by reference to tables or another method of
  123.    calculation.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.                                                                   3
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.                         INDEX TO EPISTAT
  142.  
  143.    The following statistical tests and functions are available:
  144.                                     
  145.    TEST or FUNCTION                                  PROGRAM NAME
  146.    ----------------                                  ------------
  147.    Analysis of variance (1 and 2-way)...................ANOVA
  148.    Bayes' theorem.......................................BAYES
  149.    Binomial distribution................................BINOMIAL
  150.    Chi-square test and distribvtion.....................CHISQR
  151.    Correlation coefficients.............................CORRELAT
  152.    F distribution.......................................ANOVA
  153.    Fisher's exact test..................................FISHERS
  154.    Linear regression analysis...........................LNREGRES
  155.    Mantel-Haenszel Chi-square test......................MHCHISQR
  156.    Mantel-Haenszel for multiple controls................MHCHIMLT
  157.    McNemar's test.......................................MCNEMAR
  158.    Mean, median and standard deviation..................DATA-ONE
  159.    Normal distribution..................................NORMAL
  160.    Poisson distribution.................................POISSON
  161.    Random sample generator..............................RANDOMIZ
  162.    Rank sum test........................................RANKTEST
  163.    Rates adjusted (direct and indirect).................RATEADJ
  164.    Sample size calculations..........,..................SAMPLSIZ
  165.    Signed rank test.....................................RANKTEST
  166.    Student's T-test and T distribution..................T-TEST
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.    The following data-handling capabilities are provided:
  174.  
  175.    DATA MANIPULATION                                  PROGRAM NAME
  176.    -----------------                                  ------------
  177.    Determine best test and program names................EPISTAT
  178.    Graph histograms.....................................HISTOGRM
  179.    Graph scattergrams...................................SCATRGRM
  180.    Perform data transformations.........................LNREGRES
  181.    Print data (sorted or input order)...................DATA-ONE
  182.    Print crosstab reports...............................XTAB
  183.    Select specific records..............................SELECT
  184.    Transfer data between EPISTAT files..................FILETRAN
  185.    Transfer data from FORTRAN to EPISTAT files..........FORTRANS
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.   
  199.                                                                    4
  200.  
  201.  
  202.  
  203.                        SYSTEM REQUIREMENTS FOR EPISTAT
  204.  
  205.                MINIMUM                               OPTIMAL
  206.          IBM PC with 64K RAM                  IBM PC with 96K RAM
  207.          One 160K disk drive                  Two 320K disk drives
  208.          Monochrome monitor                   Color graphics adapter
  209.          BASICA                               Hi-res color monitor
  210.                                               BASICA
  211.                                               IBM, Epson, Okidata, or
  212.                                               Prowriter printer with
  213.                                               graphics capability
  214.  
  215.  
  216.  
  217.  
  218.                        OVERALL PROGRAM DESCRIPTION
  219.    
  220.  
  221.         All calculations in EPISTAT are performed using single precision.
  222.    Although it may first appear that double precision would be more 
  223.    appropriate for statistical tests, "double" precision makes little or
  224.    no real improvement in precision in these programs.  Many of the
  225.    algorithms used to evaluate p values use trigonometric functions which
  226.    are calculated in single precision anyway.  For best results, data
  227.    entries should be numbers between 1E+7 and 1E-7.  Larger or smaller
  228.    numbers should be multiplied by an appropriate power of 10 before
  229.    entry and analysis in EPISTAT.
  230.  
  231.  
  232.         All EPISTAT programs are written so that as much pertinent
  233.    information about the test as possible can fit on the final screen.
  234.    This feature allows a summary printed copy to be produced simply by
  235.    pressing <Shift-PrtSc>.  This will work any time there is a pause in
  236.    the program display.  Six programs, "DATA-ONE", "HISTOGRM",
  237.    "RANDOMIZ", "SCATRGRM", "SELECT", and "XTAB" produce printed reports
  238.    without using <Shift-PrtSc>.  In these, follow program instructions
  239.    to route output to your printer.
  240.    
  241.  
  242.         EPISTAT is the introductory program in the EPISTAT package.
  243.    DATA-ONE is the major data entry, editing, and printing program.
  244.    Most of the programs in EPISTAT can evaluate data entered and saved
  245.    using DATA-ONE.  Many of the programs can, in addition, evaluate
  246.    summary data.  The programs marked with a star (*) below can
  247.    evaluate data entered in DATA-ONE.  Non-starred programs provide
  248.    their own data entry routines.
  249.  
  250.  
  251.  
  252.         The EPISTAT disk should be placed in drive A (or other default
  253.    drive) when loading any program because "EPIMRG" and "EPISETUP.DAT"
  254.    are used by every program.  Once a program is running, EPISTAT can
  255.    be removed from drive A if necessary.
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.                                                                   5
  266.  
  267.  
  268.                     INDIVIDUAL PROGRAM DESCRIPTIONS
  269.  
  270.  
  271.     (1)                        "EPISTAT"
  272.         This introductory program lists the available programs and aids
  273.    the user in selecting the best statistical test.  It also allows one
  274.    to specify hardware configuration and colors for a color monitor.
  275.    Choose colors 7,0,0 if you have a monochrome monitor connected to
  276.    the color/graphics adapter.  If yours is not one of the listed printers,
  277.    check your printer's codes for the typeface you want.  For example,
  278.    the code for elite type on the Prowriter is ESC "E".  If you press
  279.    Escape then E, the display will show the decimal ASCII codes: 27 69.
  280.    An alternate method is to press <Alt> and enter the decimal code on
  281.    the numeric keypad.  Press <Enter> when the complete code is entered.
  282.  
  283.                                "DATA-ONE" *
  284.  
  285.    DATA ENTRY:
  286.         This is the central keyboard data entry program for the EPISTAT
  287.    package (for non-keyboard data entry, see FILETRAN and FORTRANS).
  288.    Initial data entry (Option 1) first asks you to name your samples or
  289.    variables.  Then type in the data, pressing <Enter> twice after each
  290.    entry.  The maximum number of samples or variables (S) allowed is
  291.    28 with a color adapter and 7 with a monochrome adapter.  The maximum
  292.    number of records in each sample is 2000/S.  A blank record can be
  293.    entered by pressing <Enter> then key F2.  To exit, press <Enter> then
  294.    key F10.  The mean, median and (n-1) standard deviation are then
  295.    displayed.  When you return to the main menu, SAVE your datafile to 
  296.    disk (Option 5) for future modification or use by other programs
  297.    in the EPISTAT package.
  298.         Although all entries in a datafile are treated as numbers by 
  299.    DATA-ONE, it is possible to enter characters (names) in a record.
  300.    Characters will be treated as zeros in calculations.  Nevertheless,
  301.    it improves data readability to use the "Sample 1" column for record
  302.    or case names.  Thus, DATA-ONE allows one to specify a name for each
  303.    column (variable) and each row (case) in the datafile.
  304.  
  305.    DATA MODIFICATION:  
  306.         APPEND (Option 2) allows one to add more observations to a sample
  307.    at a later session.  EDIT (Option 3) allows one to delete or replace
  308.    incorrect data entries and to change sample or variable names.  When
  309.    you return to the main menu, SAVE modified data to disk again.
  310.  
  311.    
  312.    PRINTING DATA:
  313.         To view or review a datafile, a printout to screen or printer can
  314.    be selected (Option 4).  To print a datafile exactly as it was keyed in,
  315.    request the printout in INPUT order.  DATA-ONE can also print the
  316.    data SORTED by any selected sample.  Only numeric data is sorted by 
  317.    DATA-ONE, so it will not alphabetize a character field.  Blank records
  318.    are not sorted, either.
  319.  
  320.    SAVING DATAFILES and LOADING DATAFILES:
  321.         SAVING data (Option 5), writes your data to disk in a sequential
  322.    file for later editing, review, or use by another program.  DATA MUST
  323.    BE SAVED TO DISK before it can be used by other programs in EPISTAT.
  324.    Since EPISTAT must be in drive A: (or other default drive) to begin,
  325.    you will probably want to SAVE datafiles on drive B.  To do so,
  326.    precede each datafile name with B: (e.g. B:TESTDATA).  Do not enclose
  327.    filenames in quotation marks.
  328.  
  329.  
  330.      
  331.                                                                   6
  332.  
  333.  
  334.  
  335.  
  336.  
  337.     (3)                        "ANOVA" *
  338.  
  339.         Provides ONE-way and TWO-way analysis of variance.  One-way ANOVA
  340.    compares the means of 3 or more samples.  Two-way ANOVA compares the
  341.    combined effects of 2 variables on a third (ROW and COLUMN effects).
  342.    All samples in two-way ANOVA must have the same number of elements.
  343.    ANOVA prints sample means, (n-1) variances and sums of squares.
  344.    It also evaluates a known F value. (Snedecor, pp. 258-338)
  345.  
  346.     (4)                        "BAYES"
  347.  
  348.         Using Bayes' theorem, this program calculates the rates of false
  349.    positive and false negative tests given different sensitivities,
  350.    specificities and outcome incidences.  Using the formula in a different
  351.    way, it calculates the prior probability of several outcomes given a
  352.    positive test. (Fleiss, p. 5)
  353.  
  354.     (5)                       "BINOMIAL"
  355.  
  356.         The binomial distribution allows calculation of the probability
  357.    of an observed number compared to the expected.  It assumes the variable
  358.    is dichotomous and has an equal probability of occurring in each trial.
  359.    This program calculates the ONE-tailed probability of the observed
  360.    number and all more extreme situations.  For example, in the case of
  361.    2 heads in 10 tosses of a coin, the ONE-tailed probability includes the
  362.    sum of the probabilities for 0,1 and 2 heads. (Colton, p. 151)
  363.  
  364.     (6)                        "CHISQR"
  365.  
  366.         The Chi-square program evaluates a table of data or a known
  367.    chi-square value.  2 by 2 tables are evaluated using Yates' correction
  368.    and the odds ratio and its confidence limits are calculated using
  369.    Cornfield's method (Schlesselman, p. 175,177).  A Chi-square test
  370.    for trend can also be performed. (Sclesselman, p. 201)
  371.  
  372.     (7)                       "CORRELAT" *
  373.  
  374.         Pearson's correlation coefficient and Spearman's rank correlation
  375.    assess the relationship between paired variables.  The probability
  376.    of a given Pearson R value is evaluated using the T distribution.
  377.    (Colton, p. 212)
  378.  
  379.     (8)                       "FILETRAN" *
  380.  
  381.         On occasion, it may happen that you want to compare 2 samples
  382.    or variables that are in separate datafiles.  Or you may have a data
  383.    set with more than 28 variables that you split between two or more
  384.    datafiles.  Since EPISTAT programs only allow analysis of samples
  385.    that are in the same datafile, FILETRAN allows you to transfer 
  386.    samples between two datafiles.  You may create a new datafile by
  387.    selecting one sample from DATAFILE #1 and another from DATAFILE #2.
  388.    FILETRAN can also combine two samples by APPENDING one to the other.
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.                                                                   7
  398.  
  399.  
  400.     (9)                       "FISHERS"
  401.  
  402.         Fisher's exact test evaluates 2 by 2 tables of discrete variables.
  403.    It is particularly valuable when the Chi-square test is inappropriate
  404.    because the expected value for a cell is < 5.  However, this program
  405.    can evaluate some tables where A+B+C+D > 200.
  406.  
  407.     (10)                       "FORTRANS"
  408.  
  409.         If your data was previously entered into a FORTRAN or other SDF
  410.    sequential card image file, FORTRANS may be able to transform it into
  411.    an EPISTAT datafile.  You must know the record length, appropriate
  412.    column numbers, number of decimal places and missing value code.
  413.          
  414.     (11)                      "HISTOGRM" *
  415.  
  416.         The histogram program graphs a data sample according to user
  417.    specifications on the high resolution graphics screen.  To obtain
  418.    a printed copy on the IBM, Epson, Okidata or Prowriter (specified in
  419.    "EPISTAT") press key F1.  Press F10 to return to the program.
  420.  
  421.     (12)                      "LNREGRES" *
  422.    
  423.         Linear regression analysis calculates the least-squares regression
  424.    line for paired samples.  It then uses the T distribution to determine
  425.    if the calculated slope is significantly different than zero. (Colton
  426.    p. 199)  LNREGRES also provides a variety of data transformations.
  427.    Transformed data can be saved to disk for future use or printout.
  428.  
  429.     (13)                      "MHCHISQR"
  430.  
  431.         The Mantel-Haenszel Chi-square test evaluates the relationship
  432.    between two discrete variables while controlling for the effect of
  433.    a third variable.  It also calculates an odds ratio and 95% confidence
  434.    limits. (Schlesselman, pp. 183,206)
  435.  
  436.     (14)                      "MHCHIMLT" *
  437.  
  438.         The Mantel-Haenszel Chi-square test for multiple controls compares
  439.    a case sample with 2 or more matched control samples, and calculates
  440.    a probability and an odds ratio. (Fleiss, p. 125)  MHCHIMLT can
  441.    evaluate summary data or raw data entered using DATA-ONE.  If using
  442.    DATA-ONE, data should be coded as "1" for factor present, and "0" for
  443.    factor absent in each case and control sample.
  444.  
  445.     (15)                      "MCNEMAR"
  446.  
  447.         McNemar's test (paired Chi-square test) evaluates 2 by 2 tables
  448.    of paired discrete variables using Yates' correction and calculates
  449.    an odds ratio and 95% confidence limits. (Schlesselman, p. 210)
  450.  
  451.     (16)                       "NORMAL" *
  452.  
  453.         The normal distribution has innumerable uses in statistics.  This
  454.    program specifically addresses three situations: (1) It compares
  455.    a sample mean to a population mean. (2) It calculates the proportion
  456.    of samples that would be expected to fall in any given range under
  457.    the normal curve.  (3) It calculates the two-tailed probability
  458.    associated with any given value of z.
  459.  
  460.  
  461.  
  462.  
  463.                                                                   8
  464.  
  465.  
  466.     (17)                      "POISSON"
  467.  
  468.         The Poisson distribution applies to dichotomous variables when
  469.    the number of successes can be counted, but the number of failures
  470.    cannot.  This program calculates a ONE-tailed probability.
  471.  
  472.     (18)                      "RANDOMIZ"
  473.  
  474.         This random sample generator aids in the selection of random
  475.    samples for several purposes.  It can provide a random subset of a 
  476.    larger population, or it can assign cases randomly to independent or
  477.    paired groups for case-control studies.
  478.  
  479.     (19)                      "RANKTEST" *
  480.  
  481.         Two non-parametric tests of significance are performed by this
  482.    program.  They are appropriate for small samples which are clearly NOT
  483.    normally distributed.  They also specifically apply when quantitative
  484.    variables are not available but qualitative ranks are.  The RANK SUM
  485.    TEST compares 2 independent samples.  The SIGNED RANK TEST compares the
  486.    medians of paired samples.  RANKTEST calculates the TWO-tailed
  487.    exact probability associated with the various rank sums.  Note that
  488.    for samples larger that 20 observations, the latter calculation can
  489.    take several minutes. (Colton, pp. 219-222)
  490.  
  491.  
  492.     (20)                      "RATEADJ" *
  493.  
  494.         The rate adjustment program will adjust sample rates by either
  495.    the direct or indirect methods.(Colton, pp. 47-51)  For the direct
  496.    method, the datafile must include the study sample rates and the
  497.    standard population figures.  For indirect adjustment, the datafile
  498.    used must include the study population figures and the standard
  499.    population rates.  For indirect rate adjustment, RATEADJ evaluates
  500.    the probability of the observed number of cases using the ONE-tailed
  501.    Poisson distribution for small numbers, or the Chi-square 
  502.    distribution for large numbers.
  503.  
  504.     (21)                       "SAMPLSIZ" 
  505.  
  506.         The sample size program calculates the approximate sample sizes
  507.    required to achieve statistical significance given certain specified
  508.    levels of certainty.  Adjustments are made if the user desires more
  509.    than one control per case. (Schlesselman, p. 168)
  510.  
  511.    For a survey:   TP = total population    pi = population proportion
  512.                    d = maximum acceptable error in sample proportion
  513.  
  514.                      n = [ z(a)*SQR(pi*(1-pi)) / d ] squared
  515.                             N = n / (1+n/TP)
  516.  
  517.    For a paired case-control study:  (Colton, p. 161)
  518.  
  519.     N = [(z(a)*SQR(pi*(1-pi)) + |z(b)|*SQR(PT*(1-PT))) / (PT-pi)] squared
  520.  
  521.    For an unpaired case-control study: (Fleiss, p. 41)
  522.  
  523.        [(z(a)*SQR(2*pi*(1-pi)) + |z(b)|*SQR(PT*(1-PT)+PC*(1-PC))]
  524.   N = [-----------------------------------------------------------] squared
  525.                                (PT - PC)  
  526.  
  527.  
  528.  
  529.                                                                   9
  530.  
  531.  
  532.  
  533.  
  534.     (22)                       "SCATRGRM" *
  535.  
  536.         The scattergram program graphs paired variables according to 
  537.    user specifications on the hi-res graphics screen.  To add the linear
  538.    regression line, press key F5.  To obtain a printed copy on the IBM,
  539.    Epson, Okidata or Prowriter (specified in "EPISTAT"), press key F1.
  540.    Press key F10 to return to the program.
  541.  
  542.     (23)                       "SELECT" *
  543.  
  544.         This program allows the user to select any combination of 
  545.    records for printout.  It can also create a new disk datafile that
  546.    is a select subset of the original.  One can select on any variable
  547.    with "AND" and "OR" specifications.  As many as 10 selection criteria
  548.    can be set at one time.  SELECT assumes that "AND"s are in parentheses.
  549.    For example:
  550.      "SELECT IF Sample #1>10 AND Sample #2=1 OR Sample #1<Sample #3"
  551.    is interpreted as meaning:
  552.      "SELECT IF (Sample #1>10 AND Sample #2=1) OR Sample #1<Sample #3"
  553.  
  554.     (24)                         "T-TEST" *
  555.  
  556.      The Student's T-test compares the means of two samples.  The
  557.    program provides both paired and unpaired T-test calculations.
  558.    Variances (n-1) are displayed and, for independent samples, the
  559.    equality of variances is tested to be sure that the assumptions
  560.    of the T-test are met.(Snedecor, p. 116)  T-TEST will also 
  561.    evaluate a known T value.
  562.  
  563.     (25)                          "XTAB" *
  564.  
  565.         The crosstab program generates 1,2 or 3-way crosstab reports.
  566.    It allows the user to specify the crosstab criteria as well as a name
  567.    for each row and column so that the report will be readable and
  568.    easily interpreted.
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.                                  NOTICE
  576.  
  577.    ---------------------------------------------------------------------
  578.    Users may copy EPISTAT and distribute it to others on the following
  579.    conditions:
  580.      1.  The programs are not modified in any way.
  581.      2.  Individual programs are not distributed separately.
  582.      3.  No fee is charged for copying or distribution.
  583.    ---------------------------------------------------------------------
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.                                                                 10
  596.  
  597.  
  598.  
  599.                       ====USER-SUPPORTED SOFTWARE====
  600.  
  601.         The concept of user-supported software is based on three
  602.    principles:
  603.  
  604.      1.  The value and utility of a software package is best assessed
  605.          by each user on his or her own system with his or her own data.
  606.          Only after using a program can one determine whether it serves
  607.          one's personal applications, needs, and tastes.
  608.    
  609.      2.  The creation of independent personal computer software requires
  610.          a substantial commitment of time and effort.  Rather than
  611.          duplicate this effort time after time, the computing community
  612.          can and should support individual creative efforts.
  613.  
  614.      3.  By encouraging users to copy programs, rather than spending
  615.          large sums on copy-protection, authors can supply quality
  616.          software at reduced cost.  Users will support useful programs.
  617.                                
  618.  
  619.         If after using EPISTAT, you find it of value, your contribution
  620.             in any amount will be appreciated ( $25 suggested ).
  621.  
  622.    Send contributions to:
  623.  
  624.                           Tracy L. Gustafson, M.D.
  625.                           1705 Gattis School Road
  626.                           Round Rock, Texas    78664
  627.  
  628.  
  629.  
  630.                           Thank you, and good luck.
  631.